package com.clf.springBoot.modules.account.dao;

import com.clf.springBoot.modules.account.entity.Resource;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: chenglongfei
 * @date: 2022/7/10
 * @Description ResourceDao
 */
@Mapper
@Repository
public interface ResourceDao {

    @Select("select * from account_resource ar left join account_role_resource arr " +
            "on ar.id = arr.resource_id where arr.role_id = #{roleId}")
    List<Resource> getResourcesByRoleId(int roleId);
}
